<div class="box box-primary color-palette-box bor-top0">
    <div class="nav-tabs-custom">
        <ul class="nav nav-tabs">
            <li><a href="{:Url('index')}"><i class="fa fa-mail-reply"></i> 列表</a></li>
            <li class="active"><a data-toggle="tab" href="#info">基本信息</a></li>
            <li><a data-toggle="tab" href="#seo">SEO 设置</a></li>
            <li><a data-toggle="tab" href="#template">模板设置</a></li>
        </ul>
        
        <form class="form-horizontal js-ajax-form" method="post" action="{:Url('add_post')}">
            <div class="tab-content">
                <div class="tab-pane active mt10" id="info">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">上级</label>
                        <div class="col-sm-9">
                            <select name="parentid" class="form-control select2">
                                <option value='0'>作为一级栏目</option>
                                {volist name="columns" id="vo"}
                                <option value="{$vo.id}" {if condition="$parentid eq $vo['id']"}selected{/if}>{$vo._name|raw}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">类型</label>
                        <div class="col-sm-2">
                            <select name="type" class="form-control select2">
                                <option value='1'>普通文章</option>
                                <option value='2'>单页</option>
                                <option value='3'>栏目首页</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">栏目名称 <span>*</span></label>
                        <div class="col-sm-9">
                            <input type="text" name="name" class="form-control" placeholder="栏目名称" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">栏目英文名</label>
                        <div class="col-sm-9">
                            <input type="text" name="letter" class="form-control" placeholder="栏目英文名" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">外部链接地址</label>
                        <div class="col-sm-9">
                            <input type="text" name="weburl" class="form-control" placeholder="需要跳转到指定页面时填写" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">icon</label>
                        <div class="col-sm-9">
                            <input type="text" name="icon" class="form-control" placeholder="不带前缀fa-，如fa-user => user" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">缩略图</label>
                        <div class="col-sm-2">
                            <a href="javascript:;" class="upload_thumb" onclick="flashupload('图片上传','image', thumb_images, '1,baseImage'); return false;">
                                <img src="__IMG__/icon/default-thumbnail.png" id="image_preview" style="max-width:100px; max-height:100px;" />
                                <input type="hidden" name="image" id="image" />
                            </a>
                            <div class="mt5">
                                <button class="btn btn-xs btn-danger" onclick="$('#image_preview').attr('src','__IMG__/icon/default-thumbnail.png');$('#image').val('');return false;">取消图片</button>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">栏目描述</label>
                        <div class="col-sm-9">
                            <textarea name="description" rows="3" class="form-control" placeholder="栏目描述"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">栏目内容</label>
                        <div class="col-sm-9">
                            <script id="editor" name="content" type="text/plain" style="height:300px;"></script>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">状态</label>
                        <div class="col-sm-2">
                            <select name="display" class="form-control select2">
                                <option value='1'>显示</option>
                                <option value='0'>隐藏</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">导航栏是否显示</label>
                        <div class="col-sm-2">
                            <select name="is_nav" class="form-control select2">
                                <option value='1'>是</option>
                                <option value='0'>否</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否支持添加文章</label>
                        <div class="col-sm-2">
                            <select name="is_news" class="form-control select2">
                                <option value='1'>是</option>
                                <option value='0'>否</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序</label>
                        <div class="col-sm-1">
                            <input type="number" name="sort" min="0" class="form-control" placeholder="排序，默认0" value="0" size="16" />
                        </div>
                    </div>
                </div>
                <div class="tab-pane mt10" id="seo">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">SEO标题</label>
                        <div class="col-sm-9">
                            <input type="text" name="seo_title" class="form-control" placeholder="SEO标题" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">SEO关键词</label>
                        <div class="col-sm-9">
                            <input type="text" name="seo_keyword" class="form-control" placeholder="SEO关键词" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">SEO描述</label>
                        <div class="col-sm-9">
                            <textarea name="seo_description" rows="3" class="form-control" placeholder="SEO描述"></textarea>
                        </div>
                    </div>
                </div>
                <div class="tab-pane mt10" id="template">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">栏目首页模板</label>
                        <div class="col-sm-5">
                            <select name="setting[index]" class="form-control select2" style="width:300px;">
                                {volist name="template.index" id="tempIndex"}
                                <option value="{$tempIndex.fileName}">{$tempIndex.fileName}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">栏目列表页模板</label>
                        <div class="col-sm-5">
                            <select name="setting[list]" class="form-control select2" style="width:300px;">
                                {volist name="template.list" id="tempList"}
                                <option value="{$tempList.fileName}">{$tempList.fileName}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">内容模板</label>
                        <div class="col-sm-5">
                            <select name="setting[show]" class="form-control select2" style="width:300px;">
                                {volist name="template.show" id="tempShow"}
                                <option value="{$tempShow.fileName}">{$tempShow.fileName}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">单页模板</label>
                        <div class="col-sm-5">
                            <select name="setting[page]" class="form-control select2" style="width:300px;">
                                {volist name="template.page" id="tempPage"}
                                <option value="{$tempPage.fileName}">{$tempPage.fileName}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="box-footer">
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
                        <a href="javascript:" onclick="self.location=document.referrer;" class="btn btn-default">返回</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<script type="text/javascript" charset="utf-8" src="__JS__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__JS__/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
var ue = UE.getEditor('editor',{
	autoFloatEnabled: false,
});
</script>
{include file="public:thumb_one" picid="image" name="image" /}